home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 1.iso
/
desktop
/
papcw10.zip
/
CONVERT.PRG
< prev
next >
Wrap
Text File
|
1995-01-04
|
1KB
|
53 lines
LBL convert
puts " From To\n"
puts " -------- --------\n"
puts "1 pounds kg\n"
puts "2 oz g\n"
puts "3 °F C\n"
puts "4 inches mm\n"
puts "5 miles km\n"
puts "6 points in\n"
LBL L0
puts "\n"
PROMPT "Enter a conversion choice (1-6) and a number, or CR to exit: "
; next line executed if just a CR is entered
RTN
; here if a number was entered
SWAP
1 <
GTO L0
6 >
GTO L0
JMP
GTO L1
GTO L2
GTO L3
GTO L4
GTO L5
GTO L6
LBL L1
0 width putstack puts " pounds = " 0.4540 * putstack puts " kg\n"
GTO L0
LBL L2
0 width putstack puts " oz = " 18.3750 * putstack puts " g\n"
GTO L0
LBL L3
0 width putstack puts " °F = " 32 - 5 * 9 / putstack puts " C\n"
GTO L0
LBL L4
0 width putstack puts " in = " 25.4 * putstack puts " mm\n"
GTO L0
LBL L5
0 width putstack puts " miles = " 1.609 * putstack puts " km\n"
GTO L0
LBL L6
0 width putstack puts " points = " 72 / putstack puts " in\n"
GTO L0
END